package gam.n1.cm.i;

import gam.n1.conf.ConfManager;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;

public class ConfigReloadHandler extends BaseHandler{

    public ConfigReloadHandler(Plugin plugin) {
        super(plugin);
    }

    @Override
    public boolean handle(Player player, String[] args) throws Exception {
        ConfManager.Msg.send(player,"&cPlease do not attempt to shut down the server while reloading all files, as this can result in unpredictable consequences!",null,null);
        if (ConfManager.reload(plugin)){
            ConfManager.Msg.send(player,"&2All files reloaded successfully!",null,null);
            return true;
        }
        return false;
    }
}
